// index.js https://p7.itc.cn/q_70/images03/20220319/80ddc79dfcd14e2097dfa3ce85d69dc6.jpeg
Page({
  onLoad() {
    wx.cloud.database().collection('notice').get()
      .then(res => {
        console.log('公告列表', res)
        this.setData({
          list: res.data
        })
      })
  },
  // 去公告详情页
  goDetail(e) {
    wx.navigateTo({
      url: '/pages/notice-detail/notice-detail?id=' + e.currentTarget.dataset.id,
    })
  },

  // 按教学楼预定
  goBookingFloor() {
    wx.navigateTo({
      url: '/pages/bookingFloor/bookingFloor',
    })


  },
  // 按时间段预定
  goBookingTime: function () {
    wx.navigateTo({
      url: '/pages/bookingTime/bookingTime',
    })
  },

  // 跳转楼层分布
  gofloorDesign: function () {
    wx.navigateTo({
      url: '/pages/foorDesign/floorDesign',
    })
  },

  // 跳转图书馆历史
  goHistory: function () {
    wx.navigateTo({
      url: '/pages/historyTsg/historyTsg',
    })
  },

  // 跳转注意事项
  goPrecautions: function () {
    wx.navigateTo({
      url: '/pages/Precautions/Precautions',
    })
  }

})